<script setup lang="ts">
import { onMounted, reactive, ref } from "vue";
import { selfSupportApi } from "/@/api/Carbon module/Carbon accounting module/Carbon monitoring/self-support";

const columns = ref([
  { title: "id", dataIndex: "sourceId" },
  { title: "排放源名称", dataIndex: "sourceName" },
]);
const data = ref([]);
const queryFormState = {
  pageNum: 1,
  pageSize: 100,
};
const queryForm = reactive({ ...queryFormState });
async function query() {
  try {
    let queryReuslt = await selfSupportApi.queryData(queryForm);
    data.value = queryReuslt.data.list;
  } catch (error) {
    console.log(error);
  }
}

onMounted(() => {
  query();
});
</script>

<template>
  <div class="container">
    <a-card>
      <a-table :columns="columns" :data-source="data"> </a-table>
    </a-card>
  </div>
</template>

<style scoped lang="less"></style>
